<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
   
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>菜单管理</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

</head>
<script type="text/javascript">
	function checkLogin(){
	 var mname = document.getElementById("mname").value;//通过id获取mname的值
	 var mprice = document.getElementById("mprice").value;//通过id获取mprice的值
	 
	 if(mname == ""){
	 
	 	alert("商品名称不能为空");
	 	document.getElementById("mname").focus();
	 	 return false;
	 }else {
	 
	 	if(mprice == ""){
	 	alert("商品价格不能为空");
	 	document.getElementById("mprice").focus();
	 	 return false;
	 	
	 	}
	 	else{
	 		return true;
	 	}
	 }
	 
	
	
	}
	
</script>
<style type="text/css">

th {
      text-align:center; /*设置水平居中*/
      vertical-align:middle;/*设置垂直居中*/
}

td {
      text-align:center; /*设置水平居中*/
      vertical-align:middle;/*设置垂直居中*/
     
}
.kuoh {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 0.5;
border-radius: 3px;
}
</style>
<body>

<div class="table-responsive">
<form action="<%=path%>/menuServlet?method=add" method="post">
   <table class="table table-bordered">
  		<!-- 	<tr>
  				<td>商品号：</td>
  				<td>
  					<input type="text" id="id" name="id" disabled="disabled"/>
  					<input type="hidden" id="id" name="id"  />
  				</td>
  			</tr> -->
			<tr>
  				<td>个人物品名称：</td>
  				<td><input type="text" id="mname" name="mname" /></td>
  			</tr>
  			<tr>
  				<td>个人物品单价：</td>
  				<td><input type="text" id="mprice" name="mprice" /></td>
  			</tr>
  			
  			<tr>
  				<td><button type="submit"  value="" onclick="return checkLogin()" class="btn btn-default">添加</button></td>
  				<td><button type="reset" class="btn btn-default">重置</button></td>
  			</tr>
  			
  </table>
      </form>
      </div>

</body>
</html>